package org.ko.commons.upload;

import java.io.File;
import java.io.IOException;

import org.springframework.web.multipart.MultipartFile;

/**
 * 本地文件存储
 */
public interface FileRepository {
	public static enum FileType{
		IMAGE,FILE
	}
	String storeByExt(String path, String ext, MultipartFile file) throws IOException;
	String storeByExt(String path, String ext, File file) throws IOException;
	String storeByPath(String path, MultipartFile file) throws IOException;
	String storeByFilename(String filename, MultipartFile file) throws IOException;
	String storeByFilename(String filename, File file) throws IOException;

	
	
	File retrieve(String name) ;
	boolean remove(String path) throws IOException;
}
